@extends('layouts.adminlayout')

@section('main')
<section class="content">
    <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title">Chỉnh Sửa Tài Khoản <small>người dùng</small></h3>
            </div><!-- /.box-header -->
            {{ Form::model($tai_khoan, array('method' => 'PATCH', 'route' => array('accounts.update', $tai_khoan->id))) }}
            <div class="box-body">
                <div class="form-group">
                    <div class="row">
                        <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                            {{ Form::label('ho_cb', 'Họ :') }}
                            {{ Form::text('ho_cb',null,array('required','class'=>'form-control')) }}
                        </div>
                        <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                            {{ Form::label('ten_cb', 'Tên:') }}
                            {{ Form::text('ten_cb',null,array('required','class'=>'form-control')) }}
                        </div>
                    </div>
                </div>
                <div class="form-group" >
                    {{ Form::label('username', 'Tài Khoản:') }}
                    {{ Form::text('username',null,array('required','class'=>'form-control')) }}
                </div>

                <div class="form-group">
                    {{ Form::label('password', 'Mật Khẩu:') }}
                    <input type="password" name="password" id="password" class="form-control" required="required" value="{{{$tai_khoan->password}}}" required>

                </div>

                <div class="form-group">
                    {{ Form::label('mascb', 'Mã Cán Bộ:') }}
                    {{ Form::text('mascb',null,array('required','class'=>'form-control')) }}
                </div>



                <div class="form-group" >
                    {{ Form::label('ngay_sinh_cb', 'Ngày Sinh:') }}
                    {{ Form::text('ngay_sinh_cb',null,array('class'=>'form-control')) }}
                </div>

                <div class="form-group" >
                    {{ Form::label('gioi_tinh_cb', 'Giới Tính:') }}
                    <select name="gioi_tinh_cb" id="gioi_tinh_cb" class="form-control" required="required">
                        <option value="">--- Chọn ---</option>
                        <option value="Nam" <?php if ($tai_khoan->gioi_tinh_cb == "Nam") echo 'selected'; ?>>Nam</option>
                        <option value="Nữ" <?php if ($tai_khoan->gioi_tinh_cb == "Nữ") echo 'selected'; ?>>Nữ</option>
                    </select>
                </div>

                <div class="form-group">
                    {{ Form::label('email_cb', 'Email:') }}
                    {{ Form::email('email_cb',null,array('required','class'=>'form-control')) }}
                </div>

                <div class="form-group" hidden>

                    {{ Form::label('sdt_cb', 'Số Điện Thoại:') }}
                    {{ Form::text('sdt_cb',null,array('class'=>'form-control')) }}
                </div>

                <div class="form-group" hidden>
                    {{ Form::label('dia_chi_cb', 'Địa Chỉ:') }}
                    {{ Form::text('dia_chi_cb',null,array('class'=>'form-control')) }}
                </div>

                <div class="form-group" hidden>
                    {{ Form::label('chuc_danh', 'Chức danh:') }}
                    {{ Form::text('chuc_danh',null,array('class'=>'form-control')) }}
                </div>

                <div class="form-group" hidden  >
                    {{ Form::label('chuc_vu', 'Chuc_vu:') }}
                    {{ Form::text('chuc_vu',null,array('class'=>'form-control')) }}
                </div>

                <div class="form-footer">
                    {{ Form::submit('Cập Nhật', array('class' => 'btn btn-info')) }}
                    {{ link_to_route('accounts.show', 'Hủy', $tai_khoan->id, array('class' => 'btn')) }}
                </div>

                {{ Form::close() }}
                <br>
 
                @if ($errors->any())
                    {{ implode('', $errors->all('<div class="error callout callout-danger">:message</div>')) }}
                @endif
            </div>
        </div>
    </div>
</section>
@stop